//
// Created by Administrator on 2024/3/17.
//
// 经典快速排序算法
#include<bits/stdc++.h>

using namespace std;
const int maxn = 1e5 + 500;
int a[maxn];
int n;

//sort a[low::high];
void Qsort(int *a, int low, int high) {
    if (low >= high)return;
    int pivot = a[low];
    int i = low, j = high;
    while (1) {
        while (i < j && a[j] >= pivot)j--;
        while (i < j && a[i] <= pivot)i++;
        if (i >= j)break;
        swap(a[i], a[j]);
    }
    swap(a[low], a[i]);
    Qsort(a, low, i - 1);
    Qsort(a, i + 1, high);
}

int main() {
    cin >> n;
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    Qsort(a, 0, n - 1);
    for (int i = 0; i < n; i++) {
        cout << a[i] << " ";
    }

    return 0;
}